package com.wang.loanassembly.controller;


import com.ddc.api.param.LoanPurpersParam;
import com.wang.commons.result.Result;
import com.wang.loanassembly.param.purpers.ChangPurpersParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lichacha
 * @since 2022-01-04
 */
@Controller
@RequestMapping("/loanPurpose")
@Api(tags = "贷款用途的接口类")
public class LoanPurposeController {

    /**查询贷款的用途
     * 根据传入的用途id查询对应的来款用途
     */
    @ApiOperation("查询贷款用途的方法")
    @PostMapping("purpers")
    public Result loanPur(@RequestBody LoanPurpersParam lpp ){ return null;}


    /**
     * 添加贷款用途
     * 贷款用途名称
     */
    @ApiOperation("添加贷款用途")
    @PutMapping("addPurpers")
    public Result addPurpers(@ApiParam(name = "贷款用途名称",value = "ptlName",required = true) @RequestParam("ptlName") String ptlName){


        return null;
    }

    /**
     * 修改贷款用途
     * 传入贷款用途id，贷款用途名称
     * 返回给用户修改成功或者修改失败
     */
    @ApiOperation("修改贷款用途")
    @PostMapping("changePurpers")
    public Result changPurpers(@RequestBody ChangPurpersParam cpp ){
        return null;
    }

    /**
     * 删除贷款用途的接口
     * 传入贷款用途id
     * 返回删除成功，或者删除失败
     */
    @DeleteMapping("delPurpers")
    public Result delPurpers(@ApiParam(name = "ptlIds",value = "贷款用途id",required = true)@RequestParam("ptlIds")List<Integer> ptlIds){


        return null;
    }


}

